<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="test1()">测试alert</button>
		<button onclick="test2()">测试confirm</button>
		<button onclick="test3()">测试promot</button>
		用户名：<span id="span01"></span>
		<script type="text/javascript">
			function test1()
			{
				window.alert("警告对话框")
			}
			function test2()
			{
				var result=window.confirm("确认要关闭吗")
				if(result)
				{
					window.close()
				}
			}
			
			function test3()
			{
				var name=window.prompt("请输入你的名字：")
				span01.textContent=name
			}
			
		</script>
	</body>
</html>
